package com.dongpl.config.quartz;

import com.dongpl.config.quartz.Job.AddUserTask;
import org.quartz.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 定时器配置
 * @author Administrator
 */
//@Configuration
public class QuartzConfig {

    private static final String ADDUSER_TASK_IDENTITY = "AddUserTaskQuartz";

//    @Bean
//    public JobDetail quartzDetail(){
//        return JobBuilder.newJob(AddUserTask.class).withIdentity(ADDUSER_TASK_IDENTITY).storeDurably().build();
//    }
//
//    @Bean
//    public Trigger quartzTrigger(){
//        SimpleScheduleBuilder scheduleBuilder = SimpleScheduleBuilder.simpleSchedule()
//                .withIntervalInMinutes(30)
//                .repeatForever();
//        return TriggerBuilder.newTrigger().forJob(quartzDetail())
//                .withIdentity(ADDUSER_TASK_IDENTITY)
//                .withSchedule(scheduleBuilder)
//                .build();
//    }
}
